<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

namespace think;
use Illuminate\Database\Capsule\Manager as Capsule;
// ThinkPHP 引导文件
// 1. 加载基础文件
require __DIR__ . '/base.php';

// Eloquent ORM
$capsule = new Capsule;
$capsule->addConnection([
    'driver'    => Env::get("DATABASES.DB_CONNECTION"),
    'host'      => Env::get("DATABASES.DB_HOST"),
    'database'  => Env::get("DATABASES.DB_DATABASE"),
    'username'  => Env::get("DATABASES.DB_USERNAME"),
    'password'  => Env::get("DATABASES.DB_PASSWORD"),
    'charset'   => 'utf8',
    'collation' => 'utf8_unicode_ci',
    'prefix'    => '',
]);
// Setup the Eloquent ORM... (optional; unless you've used setEventDispatcher())
$capsule->bootEloquent();

// 2. 执行应用
App::run()->send();
